<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>ElementTooltipPosition (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">ui.Tooltip.ElementTooltipPosition</span>
        <span>Extends</span>
        <span class="fn-name">
          <a href="class_goog_positioning_AnchoredPosition.html">
          goog.positioning.AnchoredPosition
</a>
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Popup position implementation that positions the popup (the tooltip in this
case) based on the element position. It's positioned below the element to the
right if there's enough room to fit all of it inside the Viewport. Otherwise
it's displayed as far right as possible either above or below the element.

Used to position tooltips triggered by focus changes.


  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="http://closure-library.googlecode.com/git/closure/goog/demos/tooltip.html">Demo</a></li>
            <li><a href="local_closure_goog_ui_tooltip.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/local/closure/goog/ui/tooltip.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td><span class="type"><a href="class_goog_positioning_AbstractPosition.html">goog.positioning.AbstractPosition</a></span></td><td></td></tr>
  <tr><td><span class="type"><a href="class_goog_positioning_AnchoredPosition.html">goog.positioning.AnchoredPosition</a></span></td><td><span class="type"><a href="class_goog_positioning_AbstractPosition.html">goog.positioning.AbstractPosition</a></span></td></tr>
  <tr><td>goog.ui.Tooltip.ElementTooltipPosition</td><td><span class="type"><a href="class_goog_positioning_AnchoredPosition.html">goog.positioning.AnchoredPosition</a></span></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.ui.Tooltip.ElementTooltipPosition(<span><span class="arg">element</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">element</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span>
        <div class="entryOverview">The element to anchor the popup at.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_ui_Tooltip_ElementTooltipPosition.html">
              goog.ui.Tooltip.ElementTooltipPosition
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.ui.Tooltip.ElementTooltipPosition.prototype.reposition"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">reposition<span class="args">(<span class="arg">element</span>,&nbsp;<span class="arg">popupCorner</span>,&nbsp;<span class="arg">opt_margin</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Repositions the popup based on element position.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">element</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span>
        <div class="entryOverview">The DOM element of the popup.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">popupCorner</span>
        : <span class="type">goog.positioning.Corner</span>
        <div class="entryOverview">The corner of the popup element
    that should be positioned adjacent to the anchorElement.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_margin</span>
        : <span class="type">goog.math.Box=</span>
        <div class="entryOverview">A margin specified in pixels.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_tooltip.js.source.html#line1002">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_positioning_AnchoredPosition.html">
              goog.positioning.AnchoredPosition
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.positioning.AnchoredPosition.prototype.reposition"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">reposition<span class="args">(<span class="arg">movableElement</span>,&nbsp;<span class="arg">movableCorner</span>,&nbsp;<span class="arg">opt_margin</span>,&nbsp;<span class="arg">opt_preferredSize</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Repositions the movable element.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">movableElement</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span>
        <div class="entryOverview">Element to position.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">movableCorner</span>
        : <span class="type">goog.positioning.Corner</span>
        <div class="entryOverview">Corner of the movable element
    that should be positioned adjacent to the anchored element.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_margin</span>
        : <span class="type">goog.math.Box=</span>
        <div class="entryOverview">A margin specifin pixels.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_preferredSize</span>
        : <span class="type">goog.math.Size=</span>
        <div class="entryOverview">PreferredSize of the
    movableElement (unused in this class).</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_positioning_anchoredposition.js.source.html#line84">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_positioning_AbstractPosition.html">
              goog.positioning.AbstractPosition
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.positioning.AbstractPosition.prototype.reposition"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">reposition<span class="args">(<span class="arg">movableElement</span>,&nbsp;<span class="arg">corner</span>,&nbsp;<span class="arg">opt_margin</span>,&nbsp;<span class="arg">opt_preferredSize</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Repositions the element. Abstract method, should be overloaded.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">movableElement</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span>
        <div class="entryOverview">Element to position.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">corner</span>
        : <span class="type">goog.positioning.Corner</span>
        <div class="entryOverview">Corner of the movable element that
    should be positioned adjacent to the anchored element.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_margin</span>
        : <span class="type">goog.math.Box=</span>
        <div class="entryOverview">A margin specified in pixels.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_preferredSize</span>
        : <span class="type">goog.math.Size=</span>
        <div class="entryOverview">PreferredSize of the
    movableElement.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_positioning_abstractposition.js.source.html#line47">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_ui_Tooltip_ElementTooltipPosition.html">
              goog.ui.Tooltip.ElementTooltipPosition
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.ui.Tooltip.ElementTooltipPosition.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_tooltip.js.source.html#line985">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_positioning_AnchoredPosition.html">
              goog.positioning.AnchoredPosition
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.positioning.AnchoredPosition.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_positioning_anchoredposition.js.source.html#line46">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.positioning.AnchoredPosition.prototype.corner"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">corner</span>
        : 
     </div>


     <div class="entryOverview">
       Corner of anchored element the movable element should be positioned at.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_positioning_anchoredposition.js.source.html#line59">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.positioning.AnchoredPosition.prototype.element"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">element</span>
        : 
     </div>


     <div class="entryOverview">
       Element the movable element should be anchored against.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_positioning_anchoredposition.js.source.html#line53">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.positioning.AnchoredPosition.prototype.overflow_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">overflow_</span>
        : 
     </div>


     <div class="entryOverview">
       Overflow handling mode. Defaults to IGNORE if not specified.
Bitmap, .

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_positioning_anchoredposition.js.source.html#line67">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>










<div class="section">
  <table class="horiz-rule">


  </table>
</div>



<h2>Static Properties</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.ui.Tooltip.ElementTooltipPosition.superClass_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.ui.Tooltip.ElementTooltipPosition.</span><span class="entryName">superClass_</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_ui_tooltip.js.source.html#line985">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package ui.Tooltip</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="ui.Tooltip.ElementTooltipPosition"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
